<template>
    <div class="title">
        <slot></slot>
        <div class="right" v-if="isSelect">
            <el-select v-model="value" placeholder="年份" :popper-append-to-body="false">
                <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
                </el-option>
            </el-select>
            <img @click="openDialogFn" src="@/assets/images/title/right.svg" alt="" srcset="">
        </div>
    </div>
</template>

<script>
export default {
    props:['isSelect'],
    data() {
        return {
            value: '',
            options: [
                { label: 'a', value: 'aa' },
                { label: 'b', value: 'vv' },
            ]
        }
    },
    components: {

    },
    mounted() {

    },
    methods: {
        openDialogFn(){
            this.$emit('dialogFn')
        }
    },
}

</script>
<style scoped lang='scss'>
.title {
    width: 470px;
    height: 48px;
    background-image: url('@/assets/images/title/bg.svg');
    /** 文本1 */
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 1.2px;
    line-height: 40px;
    color: rgba(255, 255, 255, 1);
    padding-left: 48px;
    box-sizing: border-box;


    display: flex;
    flex-direction: row;
    justify-content: space-between;





    .right {
        // border: 1px solid red;
        display: flex;
        flex-direction: row;
        align-items: center;
        margin-bottom: 10px;

        img {
            margin-left: 10px;
            cursor: pointer;
        }

        ::v-deep {
            .el-input__inner {
                width: 112px;
                height: 37px;
                border-radius: 220px;
                background: linear-gradient(179.1deg, rgba(70, 165, 209, 0.12) 0%, rgba(70, 165, 209, 0.19) 100%);
                border: 1.2px solid rgba(70, 165, 209, 1);
                opacity: 0.6;
            }

            .el-select .el-select-dropdown {
                // background: linear-gradient(179.1deg, rgba(70, 165, 209, 0.5) 0%, rgba(70, 165, 209, 0.5) 100%);
                background-color: rgb(5, 43, 62);
                border: 1.2px solid rgba(70, 165, 209, 1);
                // box-shadow: 0 0 10px 1px #AFBCFF inset;
                // color: white;

                span {
                    color: white;
                }
            }

            .el-select-dropdown__item.hover,
            .el-select-dropdown__item:hover {
                background: linear-gradient(179.1deg, rgba(70, 165, 209, 0.12) 0%, rgba(70, 165, 209, 0.19) 100%);
            }

            .el-icon-arrow-up:before {
                background-position: center;
                background-size: 100%;
                background-repeat: no-repeat;
                background-image: url('@/assets/images/title/sanjiao.png');
            }
        }
    }
}
</style>